package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/11.
 */
@HttpInlet(Net.DingDan)
public class PostDingDan extends WHAsyPost<PostDingDan.Info> {
    public String driverid = "";
    public String type = "";
    public String page = "";

    public PostDingDan(String driverid, String type, String page, AsyCallBack asyCallBack) {
        super(asyCallBack);
        this.driverid = driverid;
        this.type = type;
        this.page = page;
    }

    @Override
    protected Info parser(JSONObject object) {
        Info info = new Info();
        try {
            info.message = object.getString("message");
            info.nextpage = object.getString("nextpage");
            info.ispage = object.getString("ispage");
            info.jsonArray = object.getJSONArray("list");
            return info;
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return null;
    }

    public static class Info {
        public String message = "";
        public String driverid = "";
        public String ispage = "";
        public String nextpage = "";
        public JSONArray jsonArray;
    }
}
